﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/SiteContent.Master" Inherits="System.Web.Mvc.ViewPage<ProjectFitus.Models.NewsContent>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Brjostagjof.is | Frétt | <%= Model.title %>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    
    <div>
    <h2><%= Html.Encode(Model.title) %></h2>
    <h5><%= Html.Encode(String.Format("{0:g}", Model.dateCreated)) %></h5>
    </div>
    <div class="news-content-text">
    <p>        
        <%= Server.HtmlDecode(Model.contentText) %>
    </p>
    <br style="clear:both;" />
    </div>
    <hr />
    </div>
    <div>
    <p>
        <b>Skráð af:</b> <%: ViewData["Author"] %><br />
        <b>Flokkur: </b> <%: ViewData["SelectedCategoryName"] %> <br />   
        <%// ToDo: eftir að útfæra teljara  %>
        <%// <b>Þessi frétt hefur verið skoðuð:</b> <%//: Html.Encode(Model.viewCount) %> <%//sinnum. <br /> %>
        <b>Síðast breytt:</b><%: Html.Encode(String.Format("{0:g}", Model.lastDateEdited)) %> <br />
        <b>Hver breytti síðast:</b> <%= Html.Encode(Model.lastEditedByUserId) %><br />
        <% string strActive = (Model.isActive)?"Já":"Nei"; %>
        <b>Er virk?:</b> <% = strActive %><br />
    </p>
    </div>
    <div>
    <p>
       <% if (User.IsInRole("Administrators"))
          { %>
            <%= Html.ActionLink("Breyta", "Edit", new { id = Model.id })%> |
            <%= Html.ActionLink("Aftur í fréttalista", "Index")%>
        <% } %>
    </p>
    </div>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>

